﻿



//双击事件
function CustomDbClick() {
    parent.closeWin(); //去掉双击功能
}

var fnCustomAdd = function () {
    const_EditEntity = "salCommissionItem";
    var pagetitle = "新增佣金项";
    parent._employeeTitle = pagetitle;
    parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&entity=" + const_EditEntity));
    parent.NeedRefreshPage = this;
}

var fnCustomEdit = function () {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    if (record == null) {
        alert("请选择一条记录");
        return;
    }
    const_EditEntity = "salCommissionItem";
    var empcode = record.getData("EmployeeCode");
    var pagetitle = "修改佣金项—" + record.getData("CName");
    parent._employeeTitle = pagetitle;
    parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&empcode=" + empcode + "&id=" + record.getData(const_entityID)));
    parent.NeedRefreshPage = this;
}

//导入
var fnImport = function () {
    document.getElementById("EditUIWindow").src = "../EHR/hrUpLoadCommissionItem.aspx";
    SetDWH(500, 350, YAHOO.example.container.dialog1);
    YAHOO.example.container.dialog1.show();
}